package config;

/**
 * 难度配置类
 * 控制不同难度的数字范围和题目比例
 */
public class DifficultyConfig {
    private int min;
    private int max;
    private double addRatio;
    private int totalCount;
    
    public DifficultyConfig(int min, int max, double addRatio, int totalCount) {
        this.min = min;
        this.max = max;
        this.addRatio = addRatio;
        this.totalCount = totalCount;
    }
    
    public int getMin() { return min; }
    public int getMax() { return max; }
    public double getAddRatio() { return addRatio; }
    public int getTotalCount() { return totalCount; }
    
    public int getAddCount() {
        return (int)(totalCount * addRatio);
    }
    
    public int getSubCount() {
        return totalCount - getAddCount();
    }
    
    public String getStats() {
        return String.format("范围:%d-%d 总数:%d 加法:%d(%.0f%%) 减法:%d(%.0f%%)", 
            min, max, totalCount, getAddCount(), addRatio*100, 
            getSubCount(), (1-addRatio)*100);
    }
}